Popup = {
	show: function(header, text) {
		$('body')
		.append('<div id="popup-overrlay"></div>')
		.append('<div id="popup-box"><div class="popup-header">' + header + '<div class="close"></div></div><div class="popup-content">' + text + '</div></div>');
		
		var self = this;
		self.setPosition();
		
		$('#popup-overrlay, #popup-box .popup-header .close').click(function() {
			self.close();
		});
		
	},
	
	setPosition: function() {
		var popupBox = $('#popup-box');
		
		popupBox.css({
			'margin-top': -parseInt(popupBox.outerHeight() / 2),
			'margin-left': -parseInt(popupBox.outerWidth() / 2)
		});
	},
	
	close: function() {
		$('#popup-overrlay, #popup-box').remove();
	}
};